package com.gitee.zou8944.ipersist.core

import com.gitee.zou8944.ipersist.utils.Resources
import com.gitee.zou8944.ipersist.utils.XmlReader


class DefaultSqlSessionFactoryBuilder : SqlSessionFactoryBuilder {

    override fun build(configPath: String): SqlSessionFactory {
        val inputStream = Resources.getResourceAsInputStream(configPath)
        val configuration = XmlReader.readCoreConfig(inputStream)
        return DefaultSqlSessionFactory(configuration)
    }

}